﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.Models
{
    [Table("T_ShippingReplenishment")]
    public class ShippingReplenishment:BaseEntity
    {
        /// <summary>
        /// 出库单Id
        /// </summary>
        public long? OrderId { get; set; }

        /// <summary>
        /// 出库单明细Id
        /// </summary>
        public long? OrderDetailId { get; set; }

        /// <summary>
        /// 单据类型 1-被动补货 2-主动补货
        /// </summary>
        public int? BillType { get; set; }

        /// <summary>
        /// 出库单号
        /// </summary>
        [MaxLength(60)]
        public string OrdeSn { get; set; }

        /// <summary>
        /// 物料ID
        /// </summary>
        public long? MaterialId { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        [MaxLength(60)]
        public string MaterialName { get; set; }

        /// <summary>
        /// 来源库房Id
        /// </summary>
        public long? FromWhId { get; set; }

        /// <summary>
        /// 来源库房名称
        /// </summary>
        [MaxLength(60)]
        public string FromWhName { get; set; }

        /// <summary>
        /// 来源库房编码
        /// </summary>
        [MaxLength(60)]
        public string FromWhCode { get; set; }

        /// <summary>
        /// 来源库区Id
        /// </summary>
        public long? FromAreaId { get; set; }

        /// <summary>
        /// 来源库区名称
        /// </summary>
        [MaxLength(60)]
        public string FromAreaName { get; set; }

        /// <summary>
        /// 来源库区编码
        /// </summary>
        [MaxLength(60)]
        public string FromAreaCode { get; set; }

        /// <summary>
        /// 来源库存Id
        /// </summary>
        public long? FromInventoryId { get; set; }

        /// <summary>
        /// 仓位Id
        /// </summary>
        public long? FromCellId { get; set; }

        /// <summary>
        /// 仓位编码
        /// </summary>
        [MaxLength(60)]
        public string FromCellCode { get; set; }

        /// <summary>
        /// 仓位名称
        /// </summary>
        [MaxLength(60)]
        public string FromCellName { get; set; }

        /// <summary>
        /// 仓位深度
        /// </summary>
        public int? FromCellDepthIndex { get; set; }

        /// <summary>
        /// 来源垛条码
        /// </summary>
        [MaxLength(60)]
        public string FromPalletBarcode { get; set; }

        /// <summary>
        /// 目标库房ID
        /// </summary>
        public long? ToWhId { get; set; }

        /// <summary>
        /// 目标库房名称
        /// </summary>
        [MaxLength(60)]
        public string ToWhName { get; set; }

        /// <summary>
        /// 目标库房编码
        /// </summary>
        [MaxLength(60)]
        public string ToWhCode { get; set; }

        /// <summary>
        /// 目标库区Id
        /// </summary>
        public long? ToAreaId { get; set; }

        /// <summary>
        /// 目标库区名称
        /// </summary>
        [MaxLength(60)]
        public string ToAreaName { get; set; }

        /// <summary>
        /// 目标库区编码
        /// </summary>
        [MaxLength(60)]
        public string ToAreaCode { get; set; }

        /// <summary>
        /// 目标库存Id
        /// </summary>
        public long? ToInventoryId { get; set; }

        /// <summary>
        /// 目标仓位Id
        /// </summary>
        public long? ToCellId { get; set; }

        /// <summary>
        /// 目标仓位编码
        /// </summary>
        [MaxLength(60)]
        public string ToCellCode { get; set; }

        /// <summary>
        /// 目标仓位名称
        /// </summary>
        [MaxLength(60)]
        public string ToCellName { get; set; }

        /// <summary>
        /// 目标仓位深度
        /// </summary>
        public int? ToCellDepthIndex { get; set; }

        /// <summary>
        /// 目标垛条码
        /// </summary>
        [MaxLength(60)]
        public string ToPalletBarcode { get; set; }

        /// <summary>
        /// 状态 0-创建 1-打包区 2-缓存区 3-作业中 4-已完成
        /// </summary>
        public int? Status { get; set; } = 0;

        /// <summary>
        /// 调整数量
        /// </summary>
        [Column(TypeName = "decimal(18,4)")]
        public decimal? AddQty
        {
            get;
            set;
        }

        /// <summary>
        /// 调整数量
        /// </summary>
        [Column(TypeName = "decimal(18,4)")]
        public decimal? SubtractQty
        {
            get;
            set;
        }

        [MaxLength(50)]
        public string Remark { get; set; }
    }
}
